package com.zyyh.utils;

import java.util.Random;

public class StringUtils {
	
	public static void main(String[] args) {
		String random = getRandom(5);
		System.out.println(random);
	}
	
	public static String getRandom(int n) {
		String ss="123456789";
		Random ran=new Random();
		StringBuffer buffer=new StringBuffer();
		for(int i=0;i<=n;i++) {
			char charAt = ss.charAt(ran.nextInt(ss.length()));
			buffer.append(charAt);
		}
		return buffer.toString();
	}

}
